package com.example.rabbitmq.config;

import com.example.rabbitmq.Constants;
import org.springframework.amqp.core.*;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class RabbitMQClusterConfig {
    @Bean("clusterQueue")
    public Queue clusterQueue() {
        //需要显示指定是否需要持久化
        return QueueBuilder.durable(Constants.CLUSTER_QUEUE).quorum().build();
    }

}
